class Interval < ActiveRecord::Base
  has_many :schedule_intervals
  has_many :schedules, :through => :schedule_intervals
  has_many :group_space_schedules
  has_many :group_teacher_schedules

  validates_presence_of :day, :starts, :ends
  validates_numericality_of :day, :only_integer => true, :greater_than => 1, :less_than_or_equal_to => 7
end
